<template>
  <div>
    <el-form ref="form" :model="filterForm" label-width="80px">
      <el-form-item label="客户姓名:">
        <el-input v-model="filterForm.customers_name" size="medium" placeholder="请输入客户姓名" />
      </el-form-item>
      <el-form-item label="手机号筛选:">
        <el-input v-model="filterForm.customers_phone" size="medium" placeholder="请输入手机号" />
      </el-form-item>
      <el-form-item label="设计师筛选:">
        <el-input v-model="filterForm.designer_name" size="medium" placeholder="请输入设计师姓名" />
      </el-form-item>
    </el-form>
    <div class="operation">
      <el-button type="primary" @click="filterClick">筛选</el-button>
      <el-button type="primary" @click="clear">清空</el-button>
      <el-button type="primary" @click="exportClick">导出EXCEL</el-button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      filterForm: {
        designer_name: '',
        customers_name: '',
        customers_phone: ''
      }
    }
  },
  methods: {
    filterClick() {
      this.$emit('filter', this.filterForm)
    },
    clear() {
      this.filterForm.designer_name = ''
      this.filterForm.customers_name = ''
      this.filterForm.customers_phone = ''
      this.filterForm.brand_name = ''
      this.$emit('filter', this.filterForm)
    },
    exportClick() {
      this.$emit('export')
    }
  }
}
</script>
<style lang="scss" scoped>
@import "@/styles/el-button.scss";
.el-form {
  display: flex;
  align-items: center;
  white-space: nowrap;
  .el-form-item {
    margin-bottom: 0;
    margin-right: 20px;
  }
}
.operation {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
}
</style>
